package com.hemaapp.yjnh.bean;

import java.io.Serializable;

import org.json.JSONException;
import org.json.JSONObject;

import com.android.uu.utils.uuUtils;

import xtom.frame.XtomObject;
import xtom.frame.exception.DataParseException;

/**关注和收藏的实体类
 * @author ZhangGuiyou
 * Date: 2015-8-31 14:06
 */
public class FollowCollect extends XtomObject implements Serializable {

	private static final long serialVersionUID = 1L;
	
	private String blog_id;// 商品id	
	private String imgurl;// 商品封面	
	private String imgurlbig;// 商品封面大图	
	private String name;// 商品名称	
	private String price;// 商品现价	
	private String oldprice;// 商品原价	
	private String sellcount;// 商品已售数
	private String client_id;// 用户id	
	private String avatar;// 用户头像/商家头像
	private String score;// 商品可用粮票
	private String nickname;// 商家名称
	private String mu_num;// 土地亩数	
	private String good_names;// 作物种类
	private String role;// 商家类型	11走走露营商家；12走走房车商家
	private String type;// 商品种类	2有机；3地标；4村游；6特产；9乐乐；11粮库；71走走房车露营；72走走自驾车露营；73走走帐篷露营；74走走商品区；75走走房车；81苗木；82花卉；83家电；84日用品；
	private String seller_id;// 商家id
	private String starscore;// 商家星级
	private String distance;// 距离	
	
	private boolean isCheck = false;

	public FollowCollect(JSONObject jsonObject) throws DataParseException {
		if (jsonObject != null) {
			try {
				blog_id = get(jsonObject, "blog_id");
				imgurl = get(jsonObject, "imgurl");
				imgurlbig = get(jsonObject, "imgurlbig");
				name = get(jsonObject, "name");
				price = uuUtils.formatAfterDot2(get(jsonObject, "price"));
				oldprice = uuUtils.formatAfterDot2(get(jsonObject, "oldprice"));
				sellcount = get(jsonObject, "sellcount");
				client_id = get(jsonObject, "client_id");
				avatar = get(jsonObject, "avatar");
				nickname = get(jsonObject, "nickname");
				mu_num = get(jsonObject, "mu_num");
				good_names = get(jsonObject, "good_names");
				distance = get(jsonObject, "distance");
				type = get(jsonObject, "type");
				seller_id = get(jsonObject, "seller_id");
				starscore = get(jsonObject, "starscore");
				role = get(jsonObject, "role");
				score = uuUtils.formatAfterDot2(get(jsonObject, "score"));

				log_i(toString());
			} catch (JSONException e) {
				throw new DataParseException(e);
			}
		}
	}

	public String getBlog_id() {
		return blog_id;
	}

	public String getRole() {
		return role;
	}

	public String getImgurl() {
		return imgurl;
	}

	public String getImgurlbig() {
		return imgurlbig;
	}

	public String getName() {
		return name;
	}

	public String getPrice() {
		return price;
	}

	public String getOldprice() {
		return oldprice;
	}

	public String getSellcount() {
		return sellcount;
	}

	public String getClient_id() {
		return client_id;
	}

	public String getAvatar() {
		return avatar;
	}

	public String getNickname() {
		return nickname;
	}

	public String getMu_num() {
		return mu_num;
	}

	public String getGood_names() {
		return good_names;
	}

	public String getType() {
		return type;
	}

	public String getSeller_id() {
		return seller_id;
	}

	public String getStarscore() {
		return starscore;
	}

	public String getDistance() {
		return distance;
	}

	public boolean isCheck() {
		return isCheck;
	}

	public void setCheck(boolean isCheck) {
		this.isCheck = isCheck;
	}

	public String getScore() {
		return score;
	}
}
